home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 441 / vdisrc12 / vdiinpt3.s < prev    next >
Text File  |  1990-11-23  |  3KB  |  85 lines

  1.  
  2. ;*========================================================================
  3. ;*
  4. ;* VDIFAST Public Domain VDI bindings.
  5. ;*
  6. ;*========================================================================
  7.  
  8.           .iif      !(^^macdef VContrl),.include  "vdimacro.s"
  9.           
  10. ;*************************************************************************
  11. ;*
  12. ;* Rarely-used input functions. 
  13. ;*  Functions which change vectors.
  14. ;*
  15. ;*  My interpretation of the exchange-vector function parms is that you
  16. ;*  pass a pointer to the new routine, and a pointer to a longword into
  17. ;*  which the address of the old routine is stored. DRI docs are not clear.
  18. ;*************************************************************************
  19.  
  20. ;*------------------------------------------------------------------------
  21. ;* Exchange timer interupt vector.
  22. ;*------------------------------------------------------------------------
  23.  
  24. _vex_timv::
  25.           .cargs    #8,.handle.w,.newtim.l,.oldtim.l,.cnvtim.l
  26.           link      a6,#0
  27.  
  28.           clr.l     -(sp)               ;* Old vector here; contrl[9-10].
  29.           move.l    .newtim(a6),-(sp)   ;* New vector in contrl[7-8].
  30.  
  31.           VContrl   #118
  32.           
  33.           subq.l    #4,sp               ;* -> ptsout
  34.           move.l    .cnvtim(a6),-(sp)   ;* -> intout
  35.           subq.l    #8,sp               ;* -> intin
  36.           pea       16(sp)              ;* -> contrl
  37.  
  38.           moveq.l   #$73,d0
  39.           move.l    sp,d1
  40.           trap      #2
  41.           
  42.           move.l    .oldtim(a6),a0      ;* Return old vector 
  43.           move.l    -4(a6),(a0)         ;* from contrl[9-10].
  44.           
  45.           unlk      a6
  46.           rts
  47.  
  48. ;*------------------------------------------------------------------------
  49. ;* Exchange button change vector.
  50. ;* Exchange mouse movement vector.
  51. ;* Exchange cursor change vector.
  52. ;*------------------------------------------------------------------------
  53.  
  54. _vex_butv::
  55.           moveq.l   #125,d0             ;* Exchange button vector function.
  56.           bra.s     vex
  57. _vex_motv::                             
  58.           moveq.l   #126,d0             ;* Exchange movement vector function.
  59.           bra.s     vex
  60. _vex_curv::
  61.           moveq.l   #127,d0             ;* Exchange cursor change vector func.
  62. vex:
  63.           .cargs    #8,.handle.w,.newvec.l,.oldvec.l
  64.           link      a6,#0
  65.           
  66.           clr.l     -(sp)               ;* contrl[9-10], old vector.
  67.           move.l    .newvec(a6),-(sp)   ;* contrl[8-8],  new vector.
  68.           
  69.           VContrl   d0
  70.           
  71.           pea       (sp)                ;* -> contrl
  72.  
  73.           moveq.l   #$73,d0
  74.           move.l    sp,d1
  75.           trap      #2
  76.           
  77.           move.l    .oldvec(a6),a0      ;* Return old vector 
  78.           move.l    -4(a6),(a0)         ;* from contrl[9-10].
  79.  
  80.           unlk      a6
  81.           rts
  82.           
  83. ;*         end of code
  84.  
  85.